Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Racer 2 #629

Merged
merged 86 commits into from
May 1, 2024
Merged

Racer 2 #629

merged 86 commits into from
May 1, 2024

Conversation

craigbeck
Copy link
Contributor

@craigbeck craigbeck commented Mar 27, 2024

  • Declaring a singleton component via ComponentClass.prototype.singleton = true; is no longer supported.
    • Instead, use a static property class ComponentClass { static singleton = true; }
    • Or without class syntax, ComponentClass.singleton = true;
  • Class hierarchies have been changed with proper base classes. In most cases the base class type is appropriate unless you are using specific client or server side methods
    • Derby base, DerbyForClient and DerbyForServer subclasses
    • Page base, PageForClient and PageForServer subclasses
    • App base, AppForClient and AppForServer subclasses
  • [change from v2 to v3] render() method between client and server has consistent arg ordering (previously reversed between client and server)

src/App.ts Outdated Show resolved Hide resolved
src/AppForServer.ts Outdated Show resolved Hide resolved
src/Derby.ts Outdated Show resolved Hide resolved
src/DerbyStandalone.ts Outdated Show resolved Hide resolved
src/Page.ts Outdated Show resolved Hide resolved
src/components.ts Outdated Show resolved Hide resolved
src/AppForServer.ts Outdated Show resolved Hide resolved
const Racer = require('racer/lib/Racer');

export abstract class DerbyBase extends Racer {
export abstract class Derby extends Racer {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only for EventEmitter?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also racer's use and serverUse, might be used for other things too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, also exposing the util functions

src/index.ts Outdated Show resolved Hide resolved
src/types.d.ts Outdated Show resolved Hide resolved
@craigbeck craigbeck marked this pull request as ready for review April 22, 2024 15:57
src/App.ts Outdated Show resolved Hide resolved
src/App.ts Outdated Show resolved Hide resolved
src/App.ts Outdated Show resolved Hide resolved
src/App.ts Outdated Show resolved Hide resolved
const Racer = require('racer/lib/Racer');

export abstract class DerbyBase extends Racer {
export abstract class Derby extends Racer {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also racer's use and serverUse, might be used for other things too

src/parsing/index.ts Outdated Show resolved Hide resolved
src/routes.ts Show resolved Hide resolved
src/types.d.ts Outdated Show resolved Hide resolved
@craigbeck craigbeck merged commit e14cc12 into master May 1, 2024
7 checks passed
@craigbeck craigbeck deleted the racer-2 branch May 1, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants